/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.kj.entity;

import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * kj_likeEntity
 * @author hzy
 * @version 2021-07-19
 */
@Table(name="kj_like", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="member_id", attrName="memberId", label="member_id"),
		@Column(name="relation_id", attrName="relationId", label="relation_id"),
		@Column(name="like_type", attrName="likeType", label="like_type"),
		@Column(name="create_by", attrName="createBy", label="create_by", isUpdate=false, isQuery=false),
		@Column(name="create_date", attrName="createDate", label="create_date", isUpdate=false, isQuery=false),
		@Column(name="update_by", attrName="updateBy", label="update_by", isQuery=false),
		@Column(name="update_date", attrName="updateDate", label="update_date", isQuery=false),
	}, orderBy="a.update_date DESC"
)
public class KjLike extends DataEntity<KjLike> {
	
	private static final long serialVersionUID = 1L;
	private String memberId;		// member_id
	private String relationId;		// relation_id
	private String likeType;		// like_type
	
	public KjLike() {
		this(null);
	}

	public KjLike(String id){
		super(id);
	}
	
	@NotBlank(message="member_id不能为空")
	@Length(min=0, max=64, message="member_id长度不能超过 64 个字符")
	public String getMemberId() {
		return memberId;
	}

	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}
	
	@NotBlank(message="relation_id不能为空")
	@Length(min=0, max=64, message="relation_id长度不能超过 64 个字符")
	public String getRelationId() {
		return relationId;
	}

	public void setRelationId(String relationId) {
		this.relationId = relationId;
	}
	
	@Length(min=0, max=10, message="like_type长度不能超过 10 个字符")
	public String getLikeType() {
		return likeType;
	}

	public void setLikeType(String likeType) {
		this.likeType = likeType;
	}
	
}